<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>证件信息管理</title>
    <!-- Bootstrap -->
    <link href="../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div class="container">
    <nav th:replace="~{system/sys/sys_topbar::top}"></nav>
    <div class="page-header">
        <h1>证件信息管理 </h1>
        <a th:href="@{/certificateAddBeforeCom}" ><button type="button" class="btn btn-info">添加公司证件信息</button></a>
    </div>
    <table class="table table-hover">
        <thead>
        <tr>
            <th>证件名</th>
            <th>证件类型</th>
            <th>证件号</th>
            <th>发放对象</th>
            <th>发放对象名称</th>
            <th>办证单位</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="certificate:${pageDTO.result}">
            <th th:text="${certificate.certificateName}"></th>
            <th th:text="${certificate.certificateType}"></th>
            <th th:text="${certificate.certificateNum}"></th>
            <th th:text="${certificate.grantObject}"></th>
            <th th:text="${certificate.grantName}"></th>
            <th th:text="${certificate.transactUnit}"></th>
            <th style="width: 140px"><a th:href="@{'/certificate_detail_company?certificateId='+${certificate.certificateId}+'&page='+${pageDTO.page.getCurrent()}}"><button type="button" class="btn btn-link" style="padding: unset">详细信息>>></button></a></th>
            <th><a th:href="@{'/certificateDelete?certificateId='+${certificate.certificateId}+'&page='+${pageDTO.page.getCurrent()}}"><button type="button" class="btn btn-danger" style="padding-bottom: unset; padding-top: unset">删除</button></a></th>
        </tr>
        </tbody>
    </table>
    <nav aria-label="Page navigation">
        <ul class="pagination">
            <li><a th:href="@{'/certificate_manage?page=1'}">首页</a></li>
            <li th:unless="${pageDTO.page.hasPrevious()}" class="disabled">
                <a aria-label="Previous">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li th:if="${pageDTO.page.hasPrevious()}">
                <a aria-label="Previous" th:href="@{'/certificate_manage?page='+${pageDTO.page.getCurrent()-1}}">
                    <span aria-hidden="true">&laquo;</span>
                </a>
            </li>
            <li><span th:text="'第 '+${pageDTO.page.getCurrent()}+' 页/共 '+${pageDTO.page.getPages()}+' 页 '"></span></li>
            <li th:unless="${pageDTO.page.hasNext()}" class="disabled">
                <a aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li th:if="${pageDTO.page.hasNext()}">
                <a href="#" aria-label="Next" th:href="@{'/certificate_manage?page='+${pageDTO.page.getCurrent()+1}}">
                    <span aria-hidden="true">&raquo;</span>
                </a>
            </li>
            <li><a th:href="@{'/certificate_manage?page='+${pageDTO.page.getPages()}}">末页</a></li>
        </ul>
    </nav>
</div>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="../jquery-3.3.1.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="../bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</body>
</html>